package com.jt.www.model.zq;

import org.apache.commons.lang.StringUtils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ZqParam {
    /**
     * 产品编码
     */
    private String productCode;
    /**
     * 投保人姓名
     */
    private String name;
    /**
     * 投保人身份证号
     */
    private String idNo;
    /**
     * 投保人手机号
     */
    private String phoneNum;
    /**
     * 签署日期查询区间（开始时间）
     */
    private Date start;
    /**
     * 签署日期查询区间（结束时间）
     */
    private Date end;

    private Integer pageSize = 10;

    private Integer pageNum = 1;

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIdNo() {
        return idNo;
    }

    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public Date getStart() {
        return start;
    }

    public void setStart(String start) {
        if (!StringUtils.isEmpty(start)) {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            try {
                this.start = sdf.parse(start);
            } catch (ParseException e) {
                e.printStackTrace();
            }
        }
    }

    public void setStart(Date start) {
        this.start = start;
    }

    public Date getEnd() {
        return end;
    }

    public void setEnd(String end) {
        if (!StringUtils.isEmpty(end)) {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            try {
                this.end = sdf.parse(end);
            } catch (ParseException e) {
                e.printStackTrace();
            }
        }
    }

    public void setEnd(Date end) {
        this.end = end;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }
}
